import  numpy as np
arr2d = np.array([[1,6,3,11,21],[4,5,6,17,22],[7,8,9,15,22],
                  [3,8,13,18,23],[2,10,15,20,25]])
print(arr2d)
print(arr2d[2,1])

print(arr2d[:2])

print(arr2d[:2,:2])

print(arr2d[:,2])   #  获取索引为2的数，即第三行

print(arr2d[:,:2])

print(arr2d[[1,4]])   # 索引第一行第四行

print(arr2d[[1,4],[2,3]])

arr_one = np.array([[1,2,3,4],[5,6,7,8],[9,10,11,12]])
arr_two = np.array([[1,2,3,4],[5,6,7,8],[9,10,11,12]])
print(arr_one+arr_two)
print(arr_one-arr_two)
print(arr_one*arr_two)
print(arr_one/arr_two)


arr_one1 = np.array([[1],[2],[3]])
print(arr_one1)
arr_two2 = np.array([1,2,3,4])
print(arr_two2)
print(arr_one1+arr_two2)

